package leetcode.leetcode_283;

class Solution {
    public void moveZeroes(int[] nums) {
        int n = nums.length;
        int left =0 ,right =0;
        while(right < n){
            if(nums[right]!=0){
                if (nums[left]==0){
                    nums[left] = nums[right];
                    nums[right] = 0;
                    left++;
                }
                else {
                    left++;
                }
            }
            right++;
        }
    }
}